//
//  SearchPersonContent.m
//  __PRODUCTNAME__
//
//  Created by Hanlingyu on 16/09/21
//  Copyright (c) m. All rights reserved.
//

#import "SearchPersonContent.h"
#import "SearchPersonFeel.h"

@implementation SearchPersonContent

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"feel"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SearchPersonFeel *feel = [SearchPersonFeel modelWithDic:dic];
            [array addObject:feel];
        }
        _feel = array;
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    [super setValue:value forUndefinedKey:key];
    if ([key isEqualToString:@"id"]) {
        _ID = value;
    }
}

+ (NSDictionary *)objectClassInArray{
    return @{@"feel" : [SearchPersonFeel class]};
}

@end
